<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">


<body>

<div th:fragment="header(navs)" >

    <style>
        .page-content{
            min-height: 1000px;
        }
    </style>

    <script src="../../static/web/wp-includes/js/jquery/jquery-3.3.1.min.js"></script>
    <script src="../../static/backstage/lib/layui/layui.js" charset="utf-8"></script>
    <script src="/static/js/constant.js"></script>
    <div id="header" class="navbar-fixed-top">
        <div class="container">
            <h1 class="logo">
                <a href="/" title="thisding 资源共享网"
                   style="background-image: url(/static/img/logo.png);"/>

                </a>
            </h1>

            <div role="navigation" class="site-nav  primary-menu">
                <div class="menu-fix-box">
                    <ul id="menu-navigation" class="menu">
                        <li th:each="n : ${navs}" th:class="${#lists.size(n['childNav'])}>0?'menu-item-has-children':''" >
                            <a th:href="@{/download/article/selectArticlesByType(type=${n['nav'].id})}" th:text="${n['nav'].name}"></a>
                            <ul class="sub-menu" >
                                <li th:each="cn : ${n['childNav']}">
                                    <a th:href="@{/download/article/selectArticlesByType(type=${cn['id']})}" th:text="${cn['name']}">商业效率</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="right-nav pull-right">

                <button class="js-toggle-search"><i class="icon-search-1"></i> 搜索</button>
                <a th:if="${session.user!=null}" th:href="'/mine?userId='+${session.user.id}">
                    <span class="line  hidden-xs hidden-sm" th:if="${session.user!=null}" th:text="'欢迎您 '+(${session.user.userName==null}?'':${session.user.userName})"></span>
                </a>
                <span class="line  hidden-xs hidden-sm" th:if="${session.user==null}"></span>
                <a th:if="${session.user==null}" th:href="@{/download/sys-user/toLogin}" class="toggle-login hidden-xs hidden-sm">登录</a>
                <span th:if="${session.user==null}" class="line  hidden-xs hidden-sm"></span>
                <a th:if="${session.user==null}" th:href="@{/download/sys-user/toRegister}" class="toggle-login hidden-xs hidden-sm">注册</a>


            </div>
            <div class="navbar-mobile hidden-md hidden-lg">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li><a href="xpay.html">赞助本站</a></li>
                        <li><a href="tags-page.htm">热门标签</a></li>
                        <li><a href="aboutus.htm">联系我们</a></li>
                    </ul>
                </div>
                <div class="body-overlay"></div>
            </div>
        </div>
    </div>


    <div class="search-form">
        <form method="get" action="/download/article/selectArticlesByKeyword" role="search">
            <div class="search-form-inner">
                <div class="search-form-box">
                    <input class="form-search" type="text" name="keyword" placeholder="键入搜索关键词">
                    <button type="submit" id="btn-search"><i class="icon-search"></i></button>

                </div>
            </div>
        </form>
        <div class="close-search">
            <span class="close-top"></span>
            <span class="close-bottom"></span>
        </div>
    </div>

</div>


</body>
</html>